abstract class Computer {
    constructor(readonly name:string){}
    abstract playMusic():void
    abstract hasUSBNumber(num:number):boolean
}

class Lenovo extends Computer {
    constructor(name:string){
        super(name)
    }
    playMusic(){
        console.log("大音响")
    }
    hasUSBNumber(num=4){
        console.log(`俺有${num}个插口`);
        
        return num >0
    }
}

const xin = new Lenovo("联想小新pro13")
xin.hasUSBNumber(5) // 俺有5个插口
xin.playMusic() // 大音响

// 创建抽象类的实例
// const abs = new Computer("hh") // 报错